#pragma once
#include <string>


//#define STHEART "stheart\r\n\r\n"

namespace stsocket
{
	const int maxErrorNum = 3;


	struct FSocketMessge
	{
	public:
		int linkid;
		int dataLen;
		std::string message;

		FSocketMessge() :linkid(-1), dataLen(0), message("")
		{
			;
		}
		FSocketMessge(int linkid_, char* data, int lem)
			: linkid(linkid_), dataLen(lem), message(data)
		{

		}

		FSocketMessge(int linkid_, std::string data)
			: linkid(linkid_), dataLen(data.size()), message(data)
		{

		}

		~FSocketMessge()
		{

		}



	};


	std::string IntToString(int i);

	bool SplitString(const std::string& data, std::string c, std::string* l, std::string* r, bool FromStart = true);
}